package com.ly.system.system.bean.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * 角色首页配置
 *
 * @author jeecg
 * @Date: 2022-03-25
 */
@Data
@TableName("sys_role_index")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@NoArgsConstructor
@Schema(description = "角色首页配置")
public class SysRoleIndex {

    /**
     * id
     */
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "id")
    private java.lang.String id;
    /**
     * 角色id
     */
    @NotEmpty(message = "角色id不能为空")
    @Schema(description = "角色id")
    private java.lang.String roleId;
    /**
     * 路由地址
     */
    @NotNull(message = "路由地址不能为空")
    @Schema(description = "路由地址")
    private java.lang.String url;
    /**
     * 路由地址
     */
    @Schema(description = "组件")
    private java.lang.String component;
    /**
     * 是否路由菜单: 0:不是  1:是（默认值1）
     */
    @Schema(description = "是否路由菜单")
    @TableField(value = "is_route")
    private Boolean route;
    /**
     * 优先级
     */
    @Schema(description = "优先级")
    private java.lang.Integer priority;
    /**
     * 路由地址
     */
    @Schema(description = "状态")
    private java.lang.String status;
    /**
     * 创建人登录名称
     */
    @Schema(description = "创建人登录名称")
    private java.lang.String createBy;
    /**
     * 创建日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建日期")
    private java.util.Date createTime;
    /**
     * 更新人登录名称
     */
    @Schema(description = "更新人登录名称")
    private java.lang.String updateBy;
    /**
     * 更新日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "更新日期")
    private java.util.Date updateTime;
    /**
     * 所属部门
     */
    @Schema(description = "所属部门")
    private java.lang.String sysOrgCode;
}
